/*
 * Created by JFormDesigner on Sat Jun 29 12:11:44 CST 2024
 */

package scct.yangxianpeng.ui;

import java.awt.*;
import javax.swing.*;

/**
 * @author 35403
 */
public class DlgBrandAdd extends JDialog {
    public DlgBrandAdd(Window owner) {
        super(owner);
        initComponents();
    }

    private void initComponents() {
        // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents  @formatter:off
        // Generated using JFormDesigner Evaluation license - yang
        labName = new JLabel();
        labCompany = new JLabel();
        txtName = new JTextField();
        txtCompany = new JTextField();
        button1 = new JButton();
        button2 = new JButton();

        //======== this ========
        setTitle("\u6dfb\u52a0\u54c1\u724c");
        var contentPane = getContentPane();
        contentPane.setLayout(null);

        //---- labName ----
        labName.setText("\u54c1\u724c\u540d\u79f0");
        contentPane.add(labName);
        labName.setBounds(new Rectangle(new Point(100, 65), labName.getPreferredSize()));

        //---- labCompany ----
        labCompany.setText("\u54c1\u724c\u516c\u53f8");
        contentPane.add(labCompany);
        labCompany.setBounds(new Rectangle(new Point(100, 130), labCompany.getPreferredSize()));
        contentPane.add(txtName);
        txtName.setBounds(180, 55, 175, 41);
        contentPane.add(txtCompany);
        txtCompany.setBounds(180, 120, 175, 41);

        //---- button1 ----
        button1.setText("\u6dfb\u52a0");
        contentPane.add(button1);
        button1.setBounds(new Rectangle(new Point(145, 230), button1.getPreferredSize()));

        //---- button2 ----
        button2.setText("\u53d6\u6d88");
        contentPane.add(button2);
        button2.setBounds(new Rectangle(new Point(285, 230), button2.getPreferredSize()));

        {
            // compute preferred size
            Dimension preferredSize = new Dimension();
            for(int i = 0; i < contentPane.getComponentCount(); i++) {
                Rectangle bounds = contentPane.getComponent(i).getBounds();
                preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width);
                preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height);
            }
            Insets insets = contentPane.getInsets();
            preferredSize.width += insets.right;
            preferredSize.height += insets.bottom;
            contentPane.setMinimumSize(preferredSize);
            contentPane.setPreferredSize(preferredSize);
        }
        setSize(500, 375);
        setLocationRelativeTo(getOwner());
        // JFormDesigner - End of component initialization  //GEN-END:initComponents  @formatter:on
    }

    // JFormDesigner - Variables declaration - DO NOT MODIFY  //GEN-BEGIN:variables  @formatter:off
    // Generated using JFormDesigner Evaluation license - yang
    private JLabel labName;
    private JLabel labCompany;
    private JTextField txtName;
    private JTextField txtCompany;
    private JButton button1;
    private JButton button2;
    // JFormDesigner - End of variables declaration  //GEN-END:variables  @formatter:on
}
